public class two_dimensional_array01 {
    //二维数组入门
    public static void main(String[] args) {
        /*
        请用二维数组输出如下图形
            0 0 0 0 0 0
            0 0 1 0 0 0
            0 2 0 3 0 0
            0 0 0 0 0 0
         */
        int[][] arr = {{0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 2, 0, 3, 0, 0}, {0, 0, 0, 0, 0, 0}};

        //输出二维图形
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.println(arr[i][j] + "\t");
            }
            System.out.println("\n");
        }

        //二维数组的元素个数
        System.out.println("二维数组的元素个数="+arr.length);
    }
}
